package com.huangjian.mapper;

import com.huangjian.pojo.Product;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface ProductMapper {
    //添加商品
    boolean addProduct(Product product);

    //根据ID查询商品
    Product queryById(@Param("productid") Integer id);

    //查询全部商品
    List<Product> queryAll();

}
